package com.greyu.ysj.mapper;

import com.greyu.ysj.entity.CbtInvitedIncome;
import com.greyu.ysj.entity.CbtInvitedIncomeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CbtInvitedIncomeMapper {
    long countByExample(CbtInvitedIncomeExample example);

    int deleteByExample(CbtInvitedIncomeExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CbtInvitedIncome record);

    int insertSelective(CbtInvitedIncome record);

    List<CbtInvitedIncome> selectByExample(CbtInvitedIncomeExample example);

    CbtInvitedIncome selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CbtInvitedIncome record, @Param("example") CbtInvitedIncomeExample example);

    int updateByExample(@Param("record") CbtInvitedIncome record, @Param("example") CbtInvitedIncomeExample example);

    int updateByPrimaryKeySelective(CbtInvitedIncome record);

    int updateByPrimaryKey(CbtInvitedIncome record);
    //**************************************************
    double selectTotalRewardByuserId(Integer userId);
    double selectYesterdayIncomeByuserId(int userId);
    
    double selectDirectRewardByuserId(Integer userId);
    
    int countByuserId(int userId);
    
    double getAllIncomeByUserId (Integer userId);
    
    double getYesterdayIncomeByUserId(Integer userId);
    double getYesterdayInvIncomeByUserId(Integer userId);
    
    double selectDirectIncomeByuserId(Integer userId);
    
    double selectInvIncomeByuserId(Integer userId);
}